# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=sad
pkgver=0.4.23
pkgrel=0
pkgdesc="CLI search and replace - a batch file edit tool"
url="https://github.com/ms-jpq/sad"
arch="all"
license="MIT"
makedepends="cargo cargo-auditable python3"
source="https://github.com/ms-jpq/sad/archive/v$pkgver/sad-$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -D -m755 target/release/sad -t "$pkgdir"/usr/bin/
}

sha512sums="
ab2db3c71e8fbbd1a7f505704b5192390a781ac607597f9e1528698b0c8a4b147e80983b142d1b9414ebadafabebefba18e6d819c65f7be5ffe75c4800216170  sad-0.4.23.tar.gz
"
